function parseSearchParams(searchParamsString){
  return searchParamsString.split('&').reduce((searchParams, curKV)=>{
    const [k, v] = curKV.split('=').map(decodeURIComponent);
    searchParams[k] = v;
    return searchParams;
  }, {});
}

console.log(parseSearchParams(location.search.slice(1)).id)

const urlObj = new URL(location.href);
const [ id ] = urlObj.searchParams.values();

console.log(id)

// console.log(urlObj)
// console.log(urlObj.searchParams.values())
